<?php
/* 
 * New AFormat Forum Theme Form
 */
require_once("$CFG->libdir/formslib.php");
class newaforumthemeform extends moodleform {
    function definition() {
        global $CFG;
        $mform =& $this->_form;
        $mform->addElement('text', 'aforumthemesubject', get_string('subject', 'forum'));
        $mform->addElement('htmleditor', 'aforumthemedescription', get_string('description'), array('rows' => 20, 'cols' => 30));
        $mform->addElement('choosecoursefile', 'aforumthemeimage', get_string('imageurl', 'editor'), array('courseid'=>$COURSE->id));
        $mform->addElement('date_selector', 'aforumthemestartdate', get_string('startdate', 'format_aformat'));
        $mform->addElement('text', 'aforumthemeimgwidth', get_string('imagewidth', 'format_aformat'), array ('value' => '130'));
        $mform->addElement('text', 'aforumthemeimgheight', get_string('imageheight', 'format_aformat'), array ('value' => '130'));
        $mform->addElement('text', 'aforumthemepostimgwidth', get_string('postimagewidth', 'format_aformat'), array ('value' => '130'));
        $mform->addElement('text', 'aforumthemepostimgheight', get_string('postimageheight', 'format_aformat'), array ('value' => '130'));
        //find color picker
        $mform->addElement('text', 'aforumthemesubjbgcolor', get_string('subjectbackcolor', 'format_aformat'), array ('value' => '#333333'));
        $mform->addElement('text', 'aforumthemesubjforecolor', get_string('subjectforecolor', 'format_aformat'), array ('value' => '#FFFFFF'));
        //-----------------
        $mform->addElement('text', 'aforumthemeexpire', get_string('expireafterdays', 'format_aformat'), array ('value' => '30'));
        $mform->addElement('text', 'aforumthememaxp', get_string('maximumpoints', 'format_aformat'), array ('value' => '5'));
        $mform->addElement('text', 'aforumthemeprule', get_string('penaltyrule', 'format_aformat'), array ('value' => '7:1;14:2'));
        $sortinOrders = array (
            'posted ASC' => 'posted ASC',
            'posted DESC' => 'posted DESC'
        );
        $mform->addElement('select', 'aforumthemesorting', get_string('sortorder', 'format_aformat'), $sortinOrders);
    }
}
?>